<!DOCTYPE html>
<html id="replace-style" lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<link rel="icon" type="image/x-icon" href="/favicon.ico" th:href="@{/favicon.ico}" >
	<title>设备信息</title>
		
</head>
<body>
<!--头部-->
<header th:replace="common/head" >
</header> 
<!-- 页面指向 -->
<div class="page-point bg-white">
	<ul>
		<li>首页</li>
		<li>台账管理</li>
		<li>设备信息</li>
	</ul>
</div>
<!-- 菜单树 -->
<div th:replace="common/left" > 
</div>
<!-- 底部 -->
<div th:replace="common/foot" > 
</div>



<!--主体内容-->
<div class="page-container">

	<div class="container-fluid mb-20 clearfix">
		<div class="col-md-12">
			<h2 class="page-section-title">查询条件</h2>
		</div>
	</div>

	<div class="container-fluid query-frame-wrap mb-10 clearfix">
        <div class="col-lg-9 col-lg-item-6">
            <div class="row">
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>设备编号</label>
                        <select id="equipCode" name="equipCode" class="form-control queryEquipment equipQuery">
                        </select>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>设备名称</label>
                        <input id="equipName" type="text" class="form-control equipQuery" />
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>所属工序</label>
                        <select id="operation" name="operation" class="form-control operationSearch equipQuery">
                        </select>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>供应商</label>
                        <select id="supplier" name="supplier" class="form-control supplier">
                        </select>
                    </div>
                </div>
            </div>
        </div>
		<div class="col-lg-3">
			<div class="query-frame query-button">
				<img th:src="@{/image/search.png}" id="queryRegister"/>
				<img th:src="@{/image/rest.png}" id="resetRegister" class="reset"/>
			</div>
		</div>
	</div>

	<div class="container-fluid mb-20 clearfix">
		<div class="col-md-12 rlt">
			<h2 class="page-section-title">设备列表</h2>
			<ul class="table-tool">
		    <li id="batchImport" shiro:hasPermission="app.equipment.register.batchImportEquip.save.mvc">
                    <span class="icon-piliang" aria-hidden="true"></span>
                    <label>批量导入</label>
             </li>
             <li id="downloadTemplate" shiro:hasPermission="app.equipment.register.downloadImportTemplate.get.mvc">
                    <span class="icon-xiazai" aria-hidden="true"></span>
                    <label>下载模板</label>
                </li>
			    <li id="addRegister" shiro:hasPermission="app.equipment.register.saveEquipmentRegister.save.mvc">
			        <span class="icon-list_add" aria-hidden="true"></span>
			        <label>新增</label>
			    </li>
			    <li id="updateRegister" shiro:hasPermission="app.equipment.register.saveEquipmentRegister.save.mvc">
			        <span class="icon-list_xiugai" aria-hidden="true"></span>
			        <label>修改</label>
			    </li>
<!-- 			    <li id="delRegister" shiro:hasPermission="app.equipment.register.delEquipmentById.del.mvc">
			        <span class="icon-list_shanchu" aria-hidden="true"></span>
			        <label>删除</label>
			    </li> -->
			    <li class="last" id="refreshRegister">
			        <span class="icon-list_shuaxin" aria-hidden="true"></span>
			        <label>刷新</label>
			    </li>
			</ul>
		</div>
	</div>

	<div class="container-fluid table-container">
		<table id="registerTable">

		</table>
	</div>
</div>

<!--模态框-表单验证和文件上传-->
<form id="equipInfoForm" method="post" class="form-horizontal tool-info-form" action="">
    <div class="modal fade modelForm" id="myModal" tabindex="-1" role="dialog" data-backdrop="static"
         data-keyboard="false">
        <div class="modal-dialog modal-dialog-big-2" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title title"></h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label class="col-lg-4 control-label form-required form-required-4">设备编号</label>
                                    <div class="col-lg-8">
                                        <input type="text" name="equipCode" class="form-control equipCode"/>
                                    </div>
                                </div>
		                        <div class="form-group">
				                    <label class="col-lg-4 control-label form-required form-required-4">设备型号</label>
				                    <div class="col-lg-8">
				                    	<select name="modelCode" class="form-control emModelName">
				                    		<option value="">请选择</option>
				                    	</select>
				                    </div>
				                </div>

				                <div class="form-group">
				                    <label class="col-lg-4 control-label">供应商</label>
				                    <div class="col-lg-8">
				                    	<input type="text" class="form-control" name="supplier" value="" readonly/>
				                    </div>
				                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label form-required form-required-4">通讯编码</label>
                                    <div class="col-lg-8">
                                        <input autocomplete="new-password" class="form-control equipCodeName" type="text" name="equipCodeName" value="" />
                                    </div>
                                </div>
				                <div class="form-group operationDiv" style="display:none">
				                    <label class="col-lg-4 control-label form-required form-required-4">所属工序</label>
				                    <div class="col-lg-8"> 
				                    	<select name="operationId" class="form-control operation">
				                    	</select>
				                    </div>
				                </div>
	                            <div class="form-group">
	                                <label class="col-lg-4 control-label form-required">厂区</label>
	                                <div class="col-lg-8">
	                                    <select name="factoryId" class="form-control factory">
	                                    </select>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label class="col-lg-4 control-label line">产线</label>
	                                <div class="col-lg-8">
	                                    <select name="lineId" class="form-control line" id="line">
	                                    </select>
	                                </div>
	                            </div>
		                        <div class="form-group">
	                                <label class="col-lg-4 control-label shop">车间</label>
	                                <div class="col-lg-8">
	                                    <select name="shopId" class="form-control shop" id="shop">
	                                    </select>
	                                </div>
	                            </div>

	                            <div class="form-group">
	                                <label class="col-lg-4 control-label form-required">区域</label>
	                                <div class="col-lg-8">
	                                    <select name="areaId" class="form-control area" id="area">
	                                    </select>
	                                </div>
	                            </div>
		                        <div class="form-group">
	                                <label class="col-lg-4 control-label form-required form-required-3">责任人</label>
	                                <div class="col-lg-8">
	                                    <select id="responsiblePerson" name="responsiblePerson" class="form-control systemUserSearch">
	                                    </select>
	                                </div>
	                            </div>
	                            
	                            <div class="form-group">
	                                <label class="col-lg-4 control-label ">操作人</label>
	                                <div class="col-lg-8">
	                                   <select  class="form-control operatingPersonnels" name="operatingPersonnels" multiple >
	                                    </select>
	                                </div>
	                            </div>
	                            
                                <div class="form-group" >
                                    <label class="col-lg-4 control-label form-required form-required-4">成本中心</label>
                                    <div class="col-lg-8">
                                        <input type="text" name="costCenter"  class="form-control costCenter" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label" >转固情况</label>
                                    <div class="col-lg-8 ">
                                        <select class="form-control toFixedAssets" name="toFixedAssets">
                                            <option value="">请选择</option>
                                            <option value="0">是</option>
                                            <option value="1">否</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label" >终验收</label>
                                    <div class="col-lg-8 ">
                                        <select class="form-control lastCheck" name="lastCheck">
                                            <option value="">请选择</option>
                                            <option value="0">是</option>
                                            <option value="1">否</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label form-required form-required-4" >设备状态</label>
                                    <div class="col-lg-8 ">
                                        <select class="form-control equipStatus" name="equipStatus">
                                        	<option value="">请选择</option>
                                            <option value="0">使用</option>
                                            <option value="1">闲置</option>
                                            <option value="2">报废</option>
                                        </select>
                                    </div>
                                </div>
                            </div>




                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label class="col-lg-4 control-label form-required form-required-4">设备名称</label>
                                    <div class="col-lg-8">
                                        <input type="text" class="form-control equipName" name="equipName"/>
                                    </div>
                                </div>
                                <div class="form-group">
				                    <label class="col-lg-4 control-label">设备类别</label>
				                    <div class="col-lg-8">
				                    	<input type="text" class="form-control equipType" name="modelType" value="" readonly/>
				                    </div>
				                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label  ">采集方式</label>
                                    <div class="col-lg-8">
                                        <input autocomplete="new-password" type="text" class="form-control" name="collectionType" value="" readonly/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label  ">日有效工时</label>
                                    <div class="col-lg-8">
                                        <input autocomplete="new-password" type="text" class="form-control dayWorkingHours" name="dayWorkingHours" value=""/>
                                    </div>
                                </div>
				                <div class="form-group">
				                    <label class="col-lg-4 control-label form-required form-required-4">PLC协议</label>
				                    <div class="col-lg-8">
				                    	<input type="text" class="form-control plcProtocal" name="plcProtocal" value=""/>
				                    </div>
				                </div>

					            <div class="form-group">
	                                <label class="col-lg-4 control-label ">辅助设备</label>
	                                <div class="col-lg-8">
	                                   <select  class="form-control aidEquipCodes" name="aidEquipCodes" multiple >
	                                    </select>
	                                </div>
	                            </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label">环境设备</label>
                                    <div class="col-lg-8">
                                        <select name="equipEnvCode" class="form-control equipEnvCode">
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label form-required form-required-4" >设备类目</label>
                                    <div class="col-lg-8 ">
                                        <select class="form-control equipCategory" name="equipCategory">
                                        	<option value="">请选择</option>
                                            <option value="0">关键设备</option>
                                            <option value="1">一般设备</option>
                                            <option value="2">特种设备</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label form-required form-required-6">原值（万元）</label>
                                    <div class="col-lg-8">
                                        <input type="text" name="oValue" class="form-control oValue"/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-lg-4 control-label">领用日期</label>
                                    <div class="col-lg-8 date-frame">
                                        <input type="text" class="form-control form_datetime" readonly="readonly" name="useDate"/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-lg-4 control-label">使用部门</label>
                                    <div class="col-lg-8 modal-checkbox-box">
                                        <input type="text" class="form-control department" name="department"/>
                                    </div>
                                </div>

                                <!--<div class="form-group">-->
                                    <!--<label class="col-lg-4 control-label form-required form-required-4">协议编码</label>-->
                                    <!--<div class="col-lg-8">-->
                                        <!--<input autocomplete="new-password" class="form-control protocalCode" type="text" name="protocalCode" value="" />-->
                                    <!--</div>-->
                                <!--</div>-->
                                <div class="form-group uploadFile">
				                    <label class="col-lg-4 control-label form-required form-required-4">上传图片</label>
				                    <div class="col-lg-8 ">
				                    	<input type="file" id="uploadfile" name="file" multiple/>
				                    	<input type="hidden" id="uploadfilePath" name="filePath"/>
				                    </div>
				                </div>
				                <div class="error-tips" style="padding-left: 155px;color: red;display:none">请先上传图片</div>
                            </div>

                        </div>

                    </div>
                    <!--主键-->
                    <input type="hidden" name="pkId" value="" id="pkId">
                </div>
                <div class="col-md-12 rlt">
							<h2 class="page-section-title">附加属性</h2>
							<div id="errorTask" class="table-tool" style="color:red">存在数值未填写，请填写完整</div>
							<ul  class="table-tool">
							</ul>
				</div>
				<div class="col-lg-12 modal-table-box">
					<div class="table-box scroll-style" style="overflow-x: auto">
						<table id="addPropertyTable" border="1" style="width: 100%;">
							
						</table>
					</div>
				</div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-primary yes">保存</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
</form>

<form id="batchImportForm"  class="form-horizontal tool-maintain-item-form" action="">
    <div class="modal fade" id="batchImportModal" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"></h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="form-group">
                            <label class="col-lg-4 control-label">上传文件</label>
                            <div class="col-lg-7">
                                <input class="form-control" type="file" name="file" id="batchImportFile"/>
                            </div>
                        </div>
                        <div class="error-tips" id="batchImportTips" style="padding-left: 210px;color: red;display:none"></div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
</form>



<!--模态框-表单验证和文件上传-->
<form id="equipInfoFormDetile" method="post" class="form-horizontal tool-info-form" action="">
    <div class="modal fade modelForm" id="myModalDetil" tabindex="-1" role="dialog" data-backdrop="static"
         data-keyboard="false">
        <div class="modal-dialog modal-dialog-big-2" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title title">查看设备详情</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label class="col-lg-4 control-label">设备编号</label>
                                    <div class="col-lg-8">
                                        <input type="text" name="equipCode" class="form-control" readonly/>
                                    </div>
                                </div>
		                        <div class="form-group">
				                    <label class="col-lg-4 control-label">设备型号</label>
				                    <div class="col-lg-8">
				                    	<input type="text" name="modelCode" class="form-control" readonly/>
				                    </div>
				                </div>

				                <div class="form-group">
				                    <label class="col-lg-4 control-label">供应商</label>
				                    <div class="col-lg-8">
				                    	<input type="text" class="form-control" name="supplier" readonly/>
				                    </div>
				                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label">通讯编码</label>
                                    <div class="col-lg-8">
                                        <input class="form-control" type="text" name="equipCodeName" value="" readonly/>
                                    </div>
                                </div>
				                <div class="form-group ">
				                    <label class="col-lg-4 control-label">所属工序</label>
				                    <div class="col-lg-8"> 
				                    	<input type="text" class="form-control" name="operation" readonly/>
				                    </div>
				                </div>
	                            <div class="form-group">
	                                <label class="col-lg-4 control-label form-required">厂区</label>
	                                <div class="col-lg-8">
	                                	<input type="text" class="form-control" name="factory" readonly/>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label class="col-lg-4 control-label line">产线</label>
	                                <div class="col-lg-8">
	                                	<input type="text" class="form-control" name="line" readonly/>
	                                </div>
	                            </div>
		                        <div class="form-group">
	                                <label class="col-lg-4 control-label shop">车间</label>
	                                <div class="col-lg-8">
	                                	<input type="text" class="form-control" name="shop" readonly/>
	                                </div>
	                            </div>

	                            <div class="form-group">
	                                <label class="col-lg-4 control-label form-required">区域</label>
	                                <div class="col-lg-8">
	                                	<input type="text" class="form-control" name="area" readonly/>
	                                </div>
	                            </div>
		                        <div class="form-group">
	                                <label class="col-lg-4 control-label">责任人</label>
	                                <div class="col-lg-8">
	                                	<input type="text" class="form-control" name="responsiblePerson" readonly/>
	                                </div>
	                            </div>
								<div class="form-group">
	                                <label class="col-lg-4 control-label">操作人</label>
	                                <div class="col-lg-8">
	                               		 <input type="text" class="form-control" name="operatingPersonnels" readonly/>
	                                </div>
	                            </div>
                                <div class="form-group" >
                                    <label class="col-lg-4 control-label">成本中心</label>
                                    <div class="col-lg-8">
                                        <input type="text" name="costCenter"  class="form-control" readonly/>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-lg-4 control-label" >设备状态</label>
                                    <div class="col-lg-8 ">
                                    	<input type="text" name="equipStatus"  class="form-control" readonly/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label" >终验收</label>
                                    <div class="col-lg-8 ">
                                    <input type="text" name="lastCheck" class="form-control" readonly/>
                                    </div>
                                </div>
                            </div>

                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label class="col-lg-4 control-label">设备名称</label>
                                    <div class="col-lg-8">
                                        <input type="text" class="form-control" name="equipName" readonly/>
                                    </div>
                                </div>
                                <div class="form-group">
				                    <label class="col-lg-4 control-label">设备类别</label>
				                    <div class="col-lg-8">
				                    	<input type="text" class="form-control" name="modelType" readonly/>
				                    </div>
				                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label  ">采集方式</label>
                                    <div class="col-lg-8">
                                        <input autocomplete="new-password" type="text" class="form-control" name="collectionType" value="" readonly/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label  ">日有效工时</label>
                                    <div class="col-lg-8">
                                        <input autocomplete="new-password" type="text" class="form-control" name="dayWorkingHours" value="" readonly/>
                                    </div>
                                </div>
				                <div class="form-group">
				                    <label class="col-lg-4 control-label">PLC协议</label>
				                    <div class="col-lg-8">
				                    	<input type="text" class="form-control" name="plcProtocal" readonly/>
				                    </div>
				                </div>
					            <div class="form-group">
	                                <label class="col-lg-4 control-label ">辅助设备</label>
	                                <div class="col-lg-8">
	                               		<input type="text" class="form-control" name="aidEquipCodes" readonly/>
	                                </div>
	                            </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label">环境设备</label>
                                    <div class="col-lg-8">
                                        <input type="text" class="form-control" name="equipEnvCode" readonly/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label" >设备类目</label>
                                    <div class="col-lg-8 ">
                                    	<input type="text" class="form-control" name="equipCategory" readonly/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label">原值（万元）</label>
                                    <div class="col-lg-8">
                                        <input type="text" name="oValue" class="form-control" readonly/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-lg-4 control-label">领用日期</label>
                                    <div class="col-lg-8 date-frame">
                                        <input type="text" class="form-control form_datetime" readonly name="useDate"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-lg-4 control-label" >转固情况</label>
                                    <div class="col-lg-8 ">
                                    	<input type="text" name="toFixedAssets" class="form-control" readonly/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-lg-4 control-label">使用部门</label>
                                    <div class="col-lg-8 modal-checkbox-box">
                                        <input type="text" class="form-control" name="department" readonly/>
                                    </div>
                                </div>

                                <!--<div class="form-group">-->
                                    <!--<label class="col-lg-4 control-label">协议编码</label>-->
                                    <!--<div class="col-lg-8">-->
                                        <!--<input class="form-control" type="text" name="protocalCode" value="" readonly/>-->
                                    <!--</div>-->
                                <!--</div>-->
                                <div class="form-group">
                                    <label class="col-lg-4 control-label">图片</label>
                                    <div class="col-lg-8 modal-checkbox-box">
                                        <img style="width:250px; height:160px;" id="imageId"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-12 rlt">
							<h2 class="page-section-title">附加属性</h2>
							<ul  class="table-tool">
							</ul>
				</div>
				<div class="col-lg-12 modal-table-box">
					<div class="table-box scroll-style" style="overflow-x: auto">
						<table id="addPropertyValueTable" border="1" style="width: 100%;">
							
						</table>
					</div>
				</div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
</form>

<script th:src="@{/js/equipment/register/register.js}" src="../../static/js/equipment/register/register.js"></script>

<script type="text/javascript">

// $(function () {

//--------------------------------------------搜索下拉框设置--------------------------------------------
//     $('#e21').select2({});
// 	$('#modal-select').select2({});
//--------------------------------------------文件上传设置--------------------------------------------
// 	$("#uploadfile").fileinput({
//
//         language: 'zh', //设置语言
//
//         uploadUrl: ctx +'/equipment/register/savePhoto/save.mvc', //上传的地址
//
//        allowedFileExtensions: ['jpg', 'gif', 'png'],//接收的文件后缀
//
//        //uploadExtraData:{"id": 1, "fileName":'123.mp3'},
//
//         uploadAsync: true, //默认异步上传
//
//         showUpload: false, //是否显示上传按钮
//         showRemove :false, //显示移除按钮
//
//         showPreview : true, //是否显示预览
//
//         showCaption:false,//是否显示标题
//
//        browseClass:"btn btn-primary", //按钮样式
//
//        dropZoneEnabled: false,//是否显示拖拽区域
//
//         maxFileSize:300,//单位为kb，如果为0表示不限制文件大小
//
//         maxFileCount: 1, //表示允许同时上传的最大文件个数
//
//         enctype:'multipart/form-data',
//
//        validateInitialCount:false,
//
//         previewFileIcon: "<iclass='glyphicon glyphicon-king'></i>",
//
//        msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}！",
//
//    }).on("fileuploaded", function (event, data, previewId, index){//上传成功后立即执行
// 	   console.log(data.response.path);
//    		$('.btn-file').hide();
// 	   $("#uploadfilePath").val(data.response.path);
// 	   $(".error-tips").css("display","none");
// 	//   $(".file-input-new").attr("disabled",true);
//    }).on('filesuccessremove', function(event, id) {//点击删除后立即执行
// 		  console.log("del");
// 		  $('.btn-file').show();
// 		$("#uploadfilePath").val("");
// 		$(".error-tips").css("display","block");
// 		});
// })

</script>
</body>
</html>